<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><script type="text/javascript" src="https://cdn.jsdelivr.net/gh/opencobra/cobratoolbox@ffa0229fc0c01c9236bb7e961f65712443277719/latest/_static/js/iframeResizer.contentWindow.min.js"></script><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,IE=9,chrome=1"><meta name="generator" content="MATLAB 2021a"><title>Identify Conserved Moieties</title><style type="text/css">.rtcContent { padding: 30px; } .S0 { margin: 3px 10px 5px 4px; padding: 0px; line-height: 28.8px; min-height: 0px; white-space: normal; color: rgb(213, 80, 0); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 24px; font-weight: normal; text-align: left;  }
.CodeBlock { background-color: #F7F7F7; margin: 10px 0 10px 0;}
.S1 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 1px solid rgb(233, 233, 233); border-bottom: 1px solid rgb(233, 233, 233); border-radius: 4px 4px 0px 0px; padding: 6px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px;  }
.S2 { color: rgb(64, 64, 64); padding: 10px 0px 6px 17px; background: rgb(255, 255, 255) none repeat scroll 0% 0% / auto padding-box border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px; overflow-x: hidden; line-height: 17.234px;  }
/* Styling that is common to warnings and errors is in diagnosticOutput.css */.embeddedOutputsErrorElement {    min-height: 18px;    max-height: 250px;    overflow: auto;}
.embeddedOutputsErrorElement.inlineElement {}
.embeddedOutputsErrorElement.rightPaneElement {}
/* Styling that is common to warnings and errors is in diagnosticOutput.css */.embeddedOutputsWarningElement{    min-height: 18px;    max-height: 250px;    overflow: auto;}
.embeddedOutputsWarningElement.inlineElement {}
.embeddedOutputsWarningElement.rightPaneElement {}
/* Copyright 2015-2019 The MathWorks, Inc. *//* In this file, styles are not scoped to rtcContainer since they could be in the Dojo Tooltip */.diagnosticMessage-wrapper {    font-family: Menlo, Monaco, Consolas, "Courier New", monospace;    font-size: 12px;}
.diagnosticMessage-wrapper.diagnosticMessage-warningType {    color: rgb(255,100,0);}
.diagnosticMessage-wrapper.diagnosticMessage-warningType a {    color: rgb(255,100,0);    text-decoration: underline;}
.diagnosticMessage-wrapper.diagnosticMessage-errorType {    color: rgb(230,0,0);}
.diagnosticMessage-wrapper.diagnosticMessage-errorType a {    color: rgb(230,0,0);    text-decoration: underline;}
.diagnosticMessage-wrapper .diagnosticMessage-messagePart,.diagnosticMessage-wrapper .diagnosticMessage-causePart {    white-space: normal;}
.diagnosticMessage-wrapper .diagnosticMessage-stackPart {    white-space: normal;}
.embeddedOutputsTextElement,.embeddedOutputsVariableStringElement {    white-space: normal;    word-wrap:  initial;    min-height: 18px;    max-height: 250px;    overflow: auto;}
.textElement,.rtcDataTipElement .textElement {    padding-top: 3px;}
.embeddedOutputsTextElement.inlineElement,.embeddedOutputsVariableStringElement.inlineElement {}
.inlineElement .textElement {}
.embeddedOutputsTextElement.rightPaneElement,.embeddedOutputsVariableStringElement.rightPaneElement {    min-height: 16px;}
.rightPaneElement .textElement {    padding-top: 2px;    padding-left: 9px;}
.S3 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 1px solid rgb(233, 233, 233); border-bottom: 0px none rgb(0, 0, 0); border-radius: 0px; padding: 6px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px;  }
.S4 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 0px none rgb(0, 0, 0); border-bottom: 0px none rgb(0, 0, 0); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px;  }
.S5 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 0px none rgb(0, 0, 0); border-bottom: 1px solid rgb(233, 233, 233); border-radius: 0px 0px 4px 4px; padding: 0px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px;  }
.S6 { margin: 3px 10px 5px 4px; padding: 0px; line-height: 18px; min-height: 0px; white-space: normal; color: rgb(60, 60, 60); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 15px; font-weight: bold; text-align: left;  }
.S7 { margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: normal; text-align: left;  }
.S8 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 1px solid rgb(233, 233, 233); border-bottom: 0px none rgb(0, 0, 0); border-radius: 4px 4px 0px 0px; padding: 6px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px;  }</style></head><body><div class = rtcContent><h1  class = 'S0'><span>Identify Conserved Moieties</span></h1><div class="CodeBlock"><div class="inlineWrapper outputs"><div  class = 'S1'><span style="white-space: normal"><span >tutorial_initConservedMoietyPaths</span></span></div><div  class = 'S2'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement scrollableOutput" uid="3C3BC915" data-testid="output_0" data-width="428" data-height="20" data-hashorizontaloverflow="true" style="width: 458px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">projectDir = </span>'~/work/sbgCloud/programExperimental/projects/tracerBased'</div></div></div><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement scrollableOutput" uid="D7ED4AA4" data-testid="output_1" data-width="428" data-height="20" data-hashorizontaloverflow="true" style="width: 458px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">dataDir = </span>'~/work/sbgCloud/programExperimental/projects/tracerBased/data/'</div></div></div><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement scrollableOutput" uid="7C2A756A" data-testid="output_2" data-width="428" data-height="20" data-hashorizontaloverflow="true" style="width: 458px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">softwareDir = </span>'~/work/sbgCloud/programExperimental/projects/tracerBased/software/'</div></div></div><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement scrollableOutput" uid="9C239948" data-testid="output_3" data-width="428" data-height="20" data-hashorizontaloverflow="true" style="width: 458px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">visDataDir = </span>'~/work/sbgCloud/programExperimental/projects/tracerBased/data/visualisation/'</div></div></div><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement scrollableOutput" uid="C13F9A9E" data-testid="output_4" data-width="428" data-height="20" data-hashorizontaloverflow="true" style="width: 458px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">resultsDir = </span>'~/work/sbgCloud/programExperimental/projects/tracerBased/results/iDopaNeuro1_ConservedMoieties/'</div></div></div><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="4A6013BE" data-testid="output_5" data-width="428" data-height="20" data-hashorizontaloverflow="false" style="width: 458px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">rxnfileDir = </span>'~/work/sbgCloud/code/fork-ctf/rxns/atomMapped'</div></div></div></div></div><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">if </span><span >~recompute || isequal(modelName,</span><span style="color: rgb(170, 4, 249);">'iDopaNeuro1'</span><span >)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    load([resultsDir modelName </span><span style="color: rgb(170, 4, 249);">'_arm.mat'</span><span >])</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">return</span></span></div></div><div class="inlineWrapper"><div  class = 'S5'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">end</span></span></div></div></div><h4  class = 'S6'><span>1.2.3. Conserved moieties </span></h4><div  class = 'S7'><span>With the atom mappings we obtained, we can compute the conserved moieties for the iDopaNeuro metabolic network using the atom transition network and the COBRA function </span><span style=' font-family: monospace;'>identifyConservedMoieties</span><span>.</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S8'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">switch </span><span >modelName</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">case </span><span style="color: rgb(170, 4, 249);">'DAS'</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        load(</span><span style="color: rgb(170, 4, 249);">'DAS.mat'</span><span >)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">otherwise</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        load([dataDir modelName </span><span style="color: rgb(170, 4, 249);">'.mat'</span><span >])</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >load([resultsDir modelName </span><span style="color: rgb(170, 4, 249);">'_dATM.mat'</span><span >])</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >options.sanityChecks=0;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >[arm, moietyFormulae] = identifyConservedMoieties(model, dATM, options);</span></span></div></div><div class="inlineWrapper"><div  class = 'S5'><span style="white-space: normal"><span >save([resultsDir modelName </span><span style="color: rgb(170, 4, 249);">'_arm.mat'</span><span >],</span><span style="color: rgb(170, 4, 249);">'arm'</span><span >, </span><span style="color: rgb(170, 4, 249);">'moietyFormulae'</span><span >,</span><span style="color: rgb(170, 4, 249);">'options'</span><span >)</span></span></div></div></div><h4  class = 'S6'></h4>
<br>
<!-- 
##### SOURCE BEGIN #####
%% Identify Conserved Moieties

tutorial_initConservedMoietyPaths
if ~recompute || isequal(modelName,'iDopaNeuro1')
    load([resultsDir modelName '_arm.mat'])
    return
end
% 1.2.3. Conserved moieties 
% With the atom mappings we obtained, we can compute the conserved moieties 
% for the iDopaNeuro metabolic network using the atom transition network and the 
% COBRA function |identifyConservedMoieties|.

switch modelName
    case 'DAS'
        load('DAS.mat')
    otherwise
        load([dataDir modelName '.mat'])
end
load([resultsDir modelName '_dATM.mat'])
options.sanityChecks=0;
[arm, moietyFormulae] = identifyConservedMoieties(model, dATM, options);
save([resultsDir modelName '_arm.mat'],'arm', 'moietyFormulae','options')
%
##### SOURCE END #####
-->
</div></body></html>